package com.hutao.manage.query;

import java.util.Date;

import org.apache.commons.lang.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import com.hutao.manage.util.StringUtil;

public class MedTraceQuery extends PageQuery {
	
	private String name;
	
	private String idCard;
	
	private String onlyId;
	
	private String mrId;

	private String startMrId;
	
	private String endMrId;
	
	private Integer visitNumber;
	
	private Integer status;
	
	private String orderType = "asc";
	
	private Integer outHospitalOfficeId;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date outHospitalStartDate;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date outHospitalEndDate;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date traceStartDate;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date traceEndDate;
	
	private Integer traceTypeId;
	
	private String firstGuid;

	
	public String getName() {
		return StringUtils.trimToNull(name);
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getIdCard() {
		return StringUtils.trimToNull(idCard);
	}


	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getMrId() {
		return StringUtil.meaningStr(mrId);
	}


	public void setMrId(String mrId) {
		this.mrId = mrId;
	}


	public String getStartMrId() {
		return StringUtils.trimToNull(startMrId);
	}


	public void setStartMrId(String startMrId) {
		this.startMrId = startMrId;
	}


	public String getEndMrId() {
		return StringUtils.trimToNull(endMrId);
	}


	public void setEndMrId(String endMrId) {
		this.endMrId = endMrId;
	}


	public Date getTraceStartDate() {
		return traceStartDate;
	}


	public void setTraceStartDate(Date traceStartDate) {
		this.traceStartDate = traceStartDate;
	}


	public Date getTraceEndDate() {
		return traceEndDate;
	}


	public void setTraceEndDate(Date traceEndDate) {
		this.traceEndDate = traceEndDate;
	}


	public Integer getTraceTypeId() {
		return traceTypeId;
	}


	public void setTraceTypeId(Integer traceTypeId) {
		this.traceTypeId = traceTypeId;
	}
	
	
	
	public Date getOutHospitalStartDate() {
		return outHospitalStartDate;
	}


	public void setOutHospitalStartDate(Date outHospitalStartDate) {
		this.outHospitalStartDate = outHospitalStartDate;
	}


	public Date getOutHospitalEndDate() {
		return outHospitalEndDate;
	}


	public void setOutHospitalEndDate(Date outHospitalEndDate) {
		this.outHospitalEndDate = outHospitalEndDate;
	}
	
	public Integer getOutHospitalOfficeId() {
		return outHospitalOfficeId;
	}


	public void setOutHospitalOfficeId(Integer outHospitalOfficeId) {
		this.outHospitalOfficeId = outHospitalOfficeId;
	}

	public String getFirstGuid() {
		return firstGuid;
	}


	public void setFirstGuid(String firstGuid) {
		this.firstGuid = firstGuid;
	}

	



	public String getOnlyId() {
		return onlyId;
	}

	public void setOnlyId(String onlyId) {
		this.onlyId = onlyId;
	}

	public Integer getStatus() {
		return status;
	}


	public void setStatus(Integer status) {
		this.status = status;
	}


	/**
	 * yimr 目前不要将firstGuid加入该条件中
	 */
	public Boolean IsPropertyEmpty(){
		if((this.getMrId()==null) && (this.getIdCard()==null)&& this.getOutHospitalStartDate()==null || this.getOutHospitalEndDate()==null || (this.getName()==null) && (this.getOnlyId()==null) && this.getOutHospitalOfficeId()==null){
			return true;
		}
		return false;
	}


	public Integer getVisitNumber() {
		return visitNumber;
	}


	public void setVisitNumber(Integer visitNumber) {
		this.visitNumber = visitNumber;
	}


	public String getOrderType() {
		return orderType;
	}


	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}
	
	
	
	
}
